package xyz.ieden.hello.service.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import xyz.ieden.commons.entity.User;
import xyz.ieden.hello.service.IUserService;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class UserServiceImpl implements IUserService{
    private static transient final Logger LOGGER = LoggerFactory.getLogger(UserServiceImpl.class);

    @Override
    public List<User> getUserList() {
        List<User> userList = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            userList.add(new User(i, "user_" + i, "pwd_" + i, "user@123.com", new Date()));
        }
        return userList;
    }

    @Override
    public User getUserById(Integer id) {
        User user = new User(id, "tom", "123123", "tom@123.com", new Date());
        return user;
    }
}
